#!/usr/bin python

from plugins.config.config_package import *

def monitor(year,cve):
    url = "https://github.com/"
    path = 'nomi-sec/PoC-in-GitHub/tree/master/{}'.format(year)
    res = core.get(url,path)
    try:
        if res.status_code == 200 and 'CVE-{}-{}'.format(year,cve) in res.text:
            print("[+] CVE-{}-{} is in Github\n".format(year,cve))
            print("[*] https://github.com/nomi-sec/PoC-in-GitHub/blob/master/{}".format(year) + "/CVE-{}-{}.json\n".format(year,cve))
        else:
            print("[-] CVE-{}-{} is not in Github\n".format(year,cve))
    except Exception as e:
        print("[-] May Be You Need VPN?\n")